*12345678901234567890123456789012345678901234567890123456789012345678901234567890
capture log close
clear all
set more off

*	************************************************************************
* 	File-Name: 	ReplicationIndicatorsAnalysis.do
*	Log-file:	na
*	Date:  		09/20/2016 (based on the original IndicatorsAnalysis.do)
*	Author: 	MA, CYC, JU, KG, AJ
*	Data Used:  AklinFrackingCounty.dta
*	Output		None
*	Purpose:   	.do file to analyze the ReplicationIndicatorsData.dta dataset
*	************************************************************************

*	************************************************************************
* 	0. Setting up the data
*	************************************************************************

clear all

*	Working directory for data
*cd "PATH TO THE FOLDER WITH THE ReplicationIndicatorsCoding.do FILE"

quiet do "./ReplicationIndicatorsCoding.do"

*	If you want to save the figures/tables in a different folder, change
*	the following path
*cd "New Path for tables/figures here"

*	Making the data survey data
svyset [pweight=weight], strata(m1_q11_village_code) singleunit(centered)
xtset m1_q11_village_code


*	************************************************************************
* 	1. Summary Stats

* 		Code adapted from:
*		http://www.stata.com/statalist/archive/2007-07/msg00581.html
*	************************************************************************

* 1st Program: Electrified households only
program mean_sd_tableA
	syntax varlist

	tempname sd

	local k : list sizeof varlist
	display as txt %12s "Variable"		///
		as txt %10s "N"			///
		as txt %12s "Mean"		///
		as txt %12s "Std. Dev."
	forval i = 1/`k' {
		local var : word `i' of `varlist'
		quietly svy: mean `var' if m2_q68_elec == 1
		scalar `sd' = sqrt(e(N)*el(e(V_srs),1,1))
		display	      as txt %12s "`var'"	///
			" "   as res %9.0g e(N)		///
			"   " as res %8.2f _b[`var']	///
			"   " as res %8.2f `sd'
	}
end

mean_sd_tableA m2_q77_electrified_satisfaction m3_q85_light_main_satisfy stdduration stdreliability stdquality duration reliability quality 

* 2nd program: all households
program mean_sd_tableB
	syntax varlist

	tempname sd

	local k : list sizeof varlist
	display as txt %12s "Variable"		///
		as txt %10s "N"			///
		as txt %12s "Mean"		///
		as txt %12s "Std. Dev."
	forval i = 1/`k' {
		local var : word `i' of `varlist'
		quietly svy: mean `var'
		scalar `sd' = sqrt(e(N)*el(e(V_srs),1,1))
		display	      as txt %12s "`var'"	///
			" "   as res %9.0g e(N)		///
			"   " as res %8.2f _b[`var']	///
			"   " as res %8.2f `sd'
	}
end

mean_sd_tableB m3_q85_light_main_satisfy m2_q68_elec 

* 3rd Program: non-electrified households
program mean_sd_tableC
	syntax varlist

	tempname sd

	local k : list sizeof varlist
	display as txt %12s "Variable"		///
		as txt %10s "N"			///
		as txt %12s "Mean"		///
		as txt %12s "Std. Dev."
	forval i = 1/`k' {
		local var : word `i' of `varlist'
		quietly svy: mean `var' if m2_q68_elec == 0
		scalar `sd' = sqrt(e(N)*el(e(V_srs),1,1))
		display	      as txt %12s "`var'"	///
			" "   as res %9.0g e(N)		///
			"   " as res %8.2f _b[`var']	///
			"   " as res %8.2f `sd'
	}
end

mean_sd_tableC m3_q85_light_main_satisfy 


*	Correlation matrix
estpost correlate stdduration stdreliability stdquality, matrix listwise
esttab using "CorMatrix.tex", ///
	replace unstack not noobs compress b(2) label


	
*	************************************************************************
* 	2. Analysis
*	************************************************************************



*	************************************************************************
* 	Table 1
*	************************************************************************

eststo: svy: reg m3_q85_light_main_satisfy stdduration districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy stdreliability districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy stdquality districtd* if m2_q68_elec == 1 
eststo: svy: reg m3_q85_light_main_satisfy stdduration districtd* stdreliability stdquality if m2_q68_elec == 1 
eststo: svy: reg m3_q85_light_main_satisfy m2_q68_elec districtd*
esttab using "RegSatisfactionLightSTDDimensionsDFE.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

*	************************************************************************
* 	Table 2
*	************************************************************************

eststo: svy: reg m2_q77_electrified_satisfaction stdduration districtd*
eststo: svy: reg m2_q77_electrified_satisfaction stdreliability districtd* 
eststo: svy: reg m2_q77_electrified_satisfaction stdquality districtd* 
eststo: svy: reg m2_q77_electrified_satisfaction stdduration districtd* stdreliability stdquality 
esttab using "RegSatisfactionElecSTDDimensionsDFE.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	mgroups("Electrified Households", pattern(1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear


*	************************************************************************
* 	Claims made in Manuscript
*	************************************************************************

*	Summary stats
svy: mean m2_q69_elec_hrs
svy: mean m2_q69_elec_hrs, over(stateid)

svy: mean m2_q71_elec_out_days
svy: mean m2_q71_elec_out_days, over(stateid)

svy: mean m2_q73_elec_equi_low_days
svy: mean m2_q73_elec_equi_low_days, over(stateid)

*	Defining access
tab m2_q60_solar_use
tab m2_q62_lightsource_other
tab m2_q58_micro_use
tab m2_q55_grid

*	Average electricity time between sunset and midnight
sum m2_q70_elec_night_hrs

* 	Policy
tab m6_q137_support_rank_elec
tab m3_q94_1_rank_household_elec

*	Effect of policy
svy: reg m6_q137_support_rank_elec stdduration stated* if m2_q68_elec == 1
svy: reg rankstd stdduration stated* if m2_q68_elec == 1
svy: reg m6_q137_support_rank_elec stdduration stdreliability stdquality stdcapacity stdexpenditure stated* if m2_q68_elec == 1
svy: reg rankstd stdduration stdreliability stdquality stdcapacity stdexpenditure stated* if m2_q68_elec == 1

svy: reg m3_q94_1_rank_household_elec stdduration stated* if m2_q68_elec == 1
svy: reg rankaltstd stdduration stated* if m2_q68_elec == 1
svy: reg m3_q94_1_rank_household_elec stdduration stdreliability stdquality stdcapacity stdexpenditure stated* if m2_q68_elec == 1
svy: reg rankaltstd stdduration stdreliability stdquality stdcapacity stdexpenditure stated* if m2_q68_elec == 1

*	For table comparison with NSS

gen hhsize = m1_q27_no_adults+m1_q29_no_children
gen expcapita = m1_q32_month_expenditure/hhsize

svy: mean expcapita m1_q32_month_expenditure m1_q19_age m1_q20_gender
svy: mean expcapita m1_q32_month_expenditure m1_q19_age m1_q20_gender if m1_q8_state == "BIHAR"
svy: mean expcapita m1_q32_month_expenditure m1_q19_age m1_q20_gender if m1_q8_state == "JHARKHAND"
svy: mean expcapita m1_q32_month_expenditure m1_q19_age m1_q20_gender if m1_q8_state == "MADHYA PRADESH"
svy: mean expcapita m1_q32_month_expenditure m1_q19_age m1_q20_gender if m1_q8_state == "ODISHA"
svy: mean expcapita m1_q32_month_expenditure m1_q19_age m1_q20_gender if m1_q8_state == "UTTAR PRADESH"
svy: mean expcapita m1_q32_month_expenditure m1_q19_age m1_q20_gender if m1_q8_state == "WEST BENGAL"

svy: tab m1_q24_religion
svy: tab m1_q24_religion if m1_q8_state == "BIHAR"
svy: tab m1_q24_religion if m1_q8_state == "JHARKHAND"
svy: tab m1_q24_religion if m1_q8_state == "MADHYA PRADESH"
svy: tab m1_q24_religion if m1_q8_state == "ODISHA"
svy: tab m1_q24_religion if m1_q8_state == "UTTAR PRADESH"
svy: tab m1_q24_religion if m1_q8_state == "WEST BENGAL"

svy: tab m1_q25_caste
svy: tab m1_q25_caste if m1_q8_state == "BIHAR"
svy: tab m1_q25_caste if m1_q8_state == "JHARKHAND"
svy: tab m1_q25_caste if m1_q8_state == "MADHYA PRADESH"
svy: tab m1_q25_caste if m1_q8_state == "ODISHA"
svy: tab m1_q25_caste if m1_q8_state == "UTTAR PRADESH"
svy: tab m1_q25_caste if m1_q8_state == "WEST BENGAL"

*	Validation of satisfaction using willingness to pay
reg m3_q98_elect_willpay m2_q77_electrified_satisfaction
reg m3_q98_elect_willpay m3_q85_light_main_satisfy

*	Test of multicollinearity
preserve
quiet svy: reg m3_q85_light_main_satisfy stdduration districtd* stdreliability stdquality if m2_q68_elec == 1 
drop if e(sample)==0
quiet svy: reg stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 
di "VIF = " 1/(1-e(r2))
quiet svy: reg stdreliability stdquality stdduration districtd* if m2_q68_elec == 1 
di "VIF = " 1/(1-e(r2))
quiet svy: reg stdquality stdduration stdreliability districtd* if m2_q68_elec == 1 
di "VIF = " 1/(1-e(r2))
restore

*quiet svy: reg m2_q77_electrified_satisfaction stdduration districtd* stdreliability stdquality 
preserve
eststo: svy: reg m2_q77_electrified_satisfaction stdduration districtd* stdreliability stdquality 
drop if e(sample)==0
quiet svy: reg stdduration districtd* stdreliability stdquality 
di "VIF = " 1/(1-e(r2))
quiet svy: reg stdreliability stdduration districtd* stdquality 
di "VIF = " 1/(1-e(r2))
quiet svy: reg stdquality stdduration districtd* stdreliability 
di "VIF = " 1/(1-e(r2))
restore


*	************************************************************************
* 	Appendix
*	************************************************************************

*	************************************************************************
* 	Initial results with covariates
*	************************************************************************

eststo: svy: reg m2_q77_electrified_satisfaction stdduration agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd*
eststo: svy: reg m2_q77_electrified_satisfaction stdreliability agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd*
eststo: svy: reg m2_q77_electrified_satisfaction stdquality agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd*
eststo: svy: reg m2_q77_electrified_satisfaction stdduration stdreliability stdquality agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd*
esttab using "RegSatisfactionElecSTDDimensionsControls.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households", pattern(1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

eststo: svy: reg m3_q85_light_main_satisfy stdduration agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy stdreliability agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy stdquality agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy stdduration stdreliability stdquality agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy m2_q68_elec agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd*
esttab using "RegSatisfactionLightSTDDimensionsControls.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

eststo: svy: reg m6_q137_support_rank_elec stdduration agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec stdreliability agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec stdquality agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec stdduration stdreliability stdquality agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec m2_q68_elec agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd*
esttab using "RegElecRankSTDDimensionsControls.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

eststo: svy: reg m3_q94_1_rank_household_elec stdduration agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec stdreliability agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec stdquality agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec stdduration stdreliability stdquality agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc  districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec m2_q68_elec agricultured m1_q19_age m1_q20_gender educd2 educd3 educd4 educd5 m1_q27_no_adults m1_q29_no_children religiond2 religiond3 casted2 casted3 casted4 m1_q32_month_expenditure m1_q33_year_save m1_q34_bank_acc districtd*
esttab using "RegElecAltRankSTDDimensionsControls.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear



*	************************************************************************
* 	Other estimation methods
*	************************************************************************

eststo: svy: ologit m2_q77_electrified_satisfaction stdduration districtd*
eststo: svy: ologit m2_q77_electrified_satisfaction stdreliability districtd*
eststo: svy: ologit m2_q77_electrified_satisfaction stdquality districtd*
eststo: svy: ologit m2_q77_electrified_satisfaction stdduration stdreliability stdquality districtd*
esttab using "OLogitSatisfactionElecSTDDimensions.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households", pattern(1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

eststo: svy: ologit m3_q85_light_main_satisfy stdduration districtd* if m2_q68_elec == 1
eststo: svy: ologit m3_q85_light_main_satisfy stdreliability districtd* if m2_q68_elec == 1
eststo: svy: ologit m3_q85_light_main_satisfy stdquality districtd* if m2_q68_elec == 1
eststo: svy: ologit m3_q85_light_main_satisfy stdduration stdreliability stdquality districtd* if m2_q68_elec == 1
eststo: svy: ologit m3_q85_light_main_satisfy m2_q68_elec districtd*
esttab using "OLogitSatisfactionLightSTDDimensions.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

eststo: svy: ologit m6_q137_support_rank_elec stdduration districtd* if m2_q68_elec == 1
eststo: svy: ologit m6_q137_support_rank_elec stdreliability districtd* if m2_q68_elec == 1
eststo: svy: ologit m6_q137_support_rank_elec stdquality districtd* if m2_q68_elec == 1
eststo: svy: ologit m6_q137_support_rank_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1
eststo: svy: ologit m6_q137_support_rank_elec m2_q68_elec districtd*
esttab using "OLogitElecRankSTDDimensions.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear 

eststo: svy: ologit m3_q94_1_rank_household_elec stdduration districtd* if m2_q68_elec == 1
eststo: svy: ologit m3_q94_1_rank_household_elec stdreliability districtd* if m2_q68_elec == 1
eststo: svy: ologit m3_q94_1_rank_household_elec stdquality districtd* if m2_q68_elec == 1
eststo: svy: ologit m3_q94_1_rank_household_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1
eststo: svy: ologit m3_q94_1_rank_household_elec m2_q68_elec districtd*
esttab using "OLogitElecAltRankSTDDimensions.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear 


eststo: svy: logit rank_energy stdduration districtd* if m2_q68_elec == 1
eststo: svy: logit rank_energy stdreliability districtd* if m2_q68_elec == 1
eststo: svy: logit rank_energy stdquality districtd* if m2_q68_elec == 1
eststo: svy: logit rank_energy stdduration stdreliability stdquality districtd* if m2_q68_elec == 1
eststo: svy: logit rank_energy m2_q68_elec districtd*
esttab using "LogitEnergyRankSTDDimensions.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

eststo: svy: reg rank_energy stdduration districtd* if m2_q68_elec == 1
eststo: svy: reg rank_energy stdreliability districtd* if m2_q68_elec == 1
eststo: svy: reg rank_energy stdquality districtd* if m2_q68_elec == 1
eststo: svy: reg rank_energy stdduration stdreliability stdquality districtd* if m2_q68_elec == 1
eststo: svy: reg rank_energy m2_q68_elec districtd*
esttab using "RegEnergyRankSTDDimensions.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear




*	************************************************************************
* 	Unweighted
*	************************************************************************

eststo: reg m3_q85_light_main_satisfy stdduration districtd* if m2_q68_elec == 1, robust
eststo: reg m3_q85_light_main_satisfy stdreliability districtd* if m2_q68_elec == 1, robust
eststo: reg m3_q85_light_main_satisfy stdquality districtd* if m2_q68_elec == 1, robust
eststo: reg m3_q85_light_main_satisfy stdduration stdreliability stdquality districtd* if m2_q68_elec == 1, robust
eststo: reg m3_q85_light_main_satisfy m2_q68_elec districtd*, robust
esttab using "RegSatisfactionLightSTDDimensionsUnweighted.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

eststo: reg m2_q77_electrified_satisfaction stdduration districtd*, robust
eststo: reg m2_q77_electrified_satisfaction stdreliability districtd*, robust
eststo: reg m2_q77_electrified_satisfaction stdquality districtd*, robust
eststo: reg m2_q77_electrified_satisfaction stdduration stdreliability stdquality districtd*, robust
esttab using "RegSatisfactionElecSTDDimensionsUnweighted.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households", pattern(1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

eststo: reg m6_q137_support_rank_elec stdduration districtd* if m2_q68_elec == 1, robust
eststo: reg m6_q137_support_rank_elec stdreliability districtd* if m2_q68_elec == 1, robust
eststo: reg m6_q137_support_rank_elec stdquality districtd* if m2_q68_elec == 1, robust
eststo: reg m6_q137_support_rank_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1, robust
eststo: reg m6_q137_support_rank_elec m2_q68_elec districtd*, robust
esttab using "RegElecRankSTDDimensionsUnweighted.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

eststo: reg m3_q94_1_rank_household_elec stdduration districtd* if m2_q68_elec == 1, robust
eststo: reg m3_q94_1_rank_household_elec stdreliability districtd* if m2_q68_elec == 1, robust
eststo: reg m3_q94_1_rank_household_elec stdquality districtd* if m2_q68_elec == 1, robust
eststo: reg m3_q94_1_rank_household_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1, robust
eststo: reg m3_q94_1_rank_household_elec m2_q68_elec districtd*, robust
esttab using "RegElecAltRankSTDDimensionsUnweighted.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear




*	************************************************************************
* 	Village FE
*	************************************************************************

eststo: xtreg m3_q85_light_main_satisfy stdduration if m2_q68_elec == 1 [pweight=weight], fe
eststo: xtreg m3_q85_light_main_satisfy stdreliability if m2_q68_elec == 1 [pweight=weight], fe
eststo: xtreg m3_q85_light_main_satisfy stdquality if m2_q68_elec == 1 [pweight=weight], fe
eststo: xtreg m3_q85_light_main_satisfy stdduration stdreliability stdquality if m2_q68_elec == 1 [pweight=weight], fe
eststo: xtreg m3_q85_light_main_satisfy m2_q68_elec [pweight=weight], fe
esttab using "RegSatisfactionLightSTDDimensionsFE.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: xtreg m2_q77_electrified_satisfaction stdduration [pweight=weight], fe
eststo: xtreg m2_q77_electrified_satisfaction stdreliability [pweight=weight], fe
eststo: xtreg m2_q77_electrified_satisfaction stdquality [pweight=weight], fe
eststo: xtreg m2_q77_electrified_satisfaction stdduration stdreliability stdquality [pweight=weight], fe
esttab using "RegSatisfactionElecSTDDimensionsFE.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	mgroups("Electrified Households", pattern(1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	nomtitles
eststo clear

eststo: xtreg m6_q137_support_rank_elec stdduration if m2_q68_elec == 1 [pweight=weight], fe
eststo: xtreg m6_q137_support_rank_elec stdreliability if m2_q68_elec == 1 [pweight=weight], fe
eststo: xtreg m6_q137_support_rank_elec stdquality if m2_q68_elec == 1 [pweight=weight], fe
eststo: xtreg m6_q137_support_rank_elec stdduration stdreliability stdquality if m2_q68_elec == 1 [pweight=weight], fe
eststo: xtreg m6_q137_support_rank_elec m2_q68_elec [pweight=weight], fe
esttab using "RegElecRankSTDDimensionsFE.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	
eststo clear

eststo: xtreg m3_q94_1_rank_household_elec stdduration if m2_q68_elec == 1 [pweight=weight], fe
eststo: xtreg m3_q94_1_rank_household_elec stdreliability if m2_q68_elec == 1 [pweight=weight], fe
eststo: xtreg m3_q94_1_rank_household_elec stdquality if m2_q68_elec == 1 [pweight=weight], fe
eststo: xtreg m3_q94_1_rank_household_elec stdduration stdreliability stdquality if m2_q68_elec == 1 [pweight=weight], fe
eststo: xtreg m3_q94_1_rank_household_elec m2_q68_elec [pweight=weight], fe
esttab using "RegElecAltRankSTDDimensionsFE.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear





*	************************************************************************
* 	By state
*	************************************************************************

*	************************************************************************
* 	Bihar
*	************************************************************************

eststo: svy: reg m3_q85_light_main_satisfy stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "BIHAR"
eststo: svy: reg m3_q85_light_main_satisfy stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "BIHAR"
eststo: svy: reg m3_q85_light_main_satisfy stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "BIHAR"
eststo: svy: reg m3_q85_light_main_satisfy stdduration stdreliability stdquality districtd*  if m2_q68_elec == 1 & m1_q8_state == "BIHAR"
eststo: svy: reg m3_q85_light_main_satisfy m2_q68_elec districtd* if m1_q8_state == "BIHAR"
esttab using "RegSatisfactionLightSTDDimensionsBihar.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m2_q77_electrified_satisfaction stdduration districtd* if m1_q8_state == "BIHAR"
eststo: svy: reg m2_q77_electrified_satisfaction stdreliability districtd* if m1_q8_state == "BIHAR"
eststo: svy: reg m2_q77_electrified_satisfaction stdquality districtd* if m1_q8_state == "BIHAR"
eststo: svy: reg m2_q77_electrified_satisfaction stdduration stdreliability stdquality districtd* if m1_q8_state == "BIHAR"
esttab using "RegSatisfactionElecSTDDimensionsBihar.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households", pattern(1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m6_q137_support_rank_elec stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "BIHAR"
eststo: svy: reg m6_q137_support_rank_elec stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "BIHAR"
eststo: svy: reg m6_q137_support_rank_elec stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "BIHAR"
eststo: svy: reg m6_q137_support_rank_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "BIHAR"
eststo: svy: reg m6_q137_support_rank_elec m2_q68_elec districtd* if m1_q8_state == "BIHAR"
esttab using "RegElecRankSTDDimensionsBihar.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m3_q94_1_rank_household_elec stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "BIHAR"
eststo: svy: reg m3_q94_1_rank_household_elec stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "BIHAR"
eststo: svy: reg m3_q94_1_rank_household_elec stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "BIHAR"
eststo: svy: reg m3_q94_1_rank_household_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "BIHAR"
eststo: svy: reg m3_q94_1_rank_household_elec m2_q68_elec districtd* if m1_q8_state == "BIHAR"
esttab using "RegElecAltRankSTDDimensionsBihar.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear



*	************************************************************************
* 	Jharkhand
*	************************************************************************

eststo: svy: reg m3_q85_light_main_satisfy stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "JHARKHAND"
eststo: svy: reg m3_q85_light_main_satisfy stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "JHARKHAND"
eststo: svy: reg m3_q85_light_main_satisfy stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "JHARKHAND"
eststo: svy: reg m3_q85_light_main_satisfy stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "JHARKHAND"
eststo: svy: reg m3_q85_light_main_satisfy m2_q68_elec districtd* if m1_q8_state == "JHARKHAND"
esttab using "RegSatisfactionLightSTDDimensionsJharkhand.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m2_q77_electrified_satisfaction stdduration districtd* if m1_q8_state == "JHARKHAND"
eststo: svy: reg m2_q77_electrified_satisfaction stdreliability districtd* if m1_q8_state == "JHARKHAND"
eststo: svy: reg m2_q77_electrified_satisfaction stdquality districtd* if m1_q8_state == "JHARKHAND"
eststo: svy: reg m2_q77_electrified_satisfaction stdduration stdreliability stdquality districtd* if m1_q8_state == "JHARKHAND"
esttab using "RegSatisfactionElecSTDDimensionsJharkhand.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households", pattern(1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m6_q137_support_rank_elec stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "JHARKHAND"
eststo: svy: reg m6_q137_support_rank_elec stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "JHARKHAND"
eststo: svy: reg m6_q137_support_rank_elec stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "JHARKHAND"
eststo: svy: reg m6_q137_support_rank_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "JHARKHAND"
eststo: svy: reg m6_q137_support_rank_elec m2_q68_elec districtd* if m1_q8_state == "JHARKHAND"
esttab using "RegElecRankSTDDimensionsJharkhand.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m3_q94_1_rank_household_elec stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "JHARKHAND"
eststo: svy: reg m3_q94_1_rank_household_elec stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "JHARKHAND"
eststo: svy: reg m3_q94_1_rank_household_elec stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "JHARKHAND"
eststo: svy: reg m3_q94_1_rank_household_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "JHARKHAND"
eststo: svy: reg m3_q94_1_rank_household_elec m2_q68_elec districtd* if m1_q8_state == "JHARKHAND"
esttab using "RegElecAltRankSTDDimensionsJharkhand.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear



*	************************************************************************
* 	Madhya Pradesh
*	************************************************************************

eststo: svy: reg m3_q85_light_main_satisfy stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "MADHYA PRADESH"
eststo: svy: reg m3_q85_light_main_satisfy stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "MADHYA PRADESH"
eststo: svy: reg m3_q85_light_main_satisfy stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "MADHYA PRADESH"
eststo: svy: reg m3_q85_light_main_satisfy stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "MADHYA PRADESH"
eststo: svy: reg m3_q85_light_main_satisfy m2_q68_elec districtd* if m1_q8_state == "MADHYA PRADESH"
esttab using "RegSatisfactionLightSTDDimensionsMP.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m2_q77_electrified_satisfaction stdduration districtd* if m1_q8_state == "MADHYA PRADESH"
eststo: svy: reg m2_q77_electrified_satisfaction stdreliability districtd* if m1_q8_state == "MADHYA PRADESH"
eststo: svy: reg m2_q77_electrified_satisfaction stdquality districtd* if m1_q8_state == "MADHYA PRADESH"
eststo: svy: reg m2_q77_electrified_satisfaction stdduration stdreliability stdquality districtd* if m1_q8_state == "MADHYA PRADESH"
esttab using "RegSatisfactionElecSTDDimensionsMP.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households", pattern(1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m6_q137_support_rank_elec stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "MADHYA PRADESH"
eststo: svy: reg m6_q137_support_rank_elec stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "MADHYA PRADESH"
eststo: svy: reg m6_q137_support_rank_elec stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "MADHYA PRADESH"
eststo: svy: reg m6_q137_support_rank_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "MADHYA PRADESH"
eststo: svy: reg m6_q137_support_rank_elec m2_q68_elec districtd* if m1_q8_state == "MADHYA PRADESH"
esttab using "RegElecRankSTDDimensionsMP.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m3_q94_1_rank_household_elec stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "MADHYA PRADESH"
eststo: svy: reg m3_q94_1_rank_household_elec stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "MADHYA PRADESH"
eststo: svy: reg m3_q94_1_rank_household_elec stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "MADHYA PRADESH"
eststo: svy: reg m3_q94_1_rank_household_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "MADHYA PRADESH"
eststo: svy: reg m3_q94_1_rank_household_elec m2_q68_elec districtd* if m1_q8_state == "MADHYA PRADESH"
esttab using "RegElecAltRankSTDDimensionsMP.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear



*	************************************************************************
* 	Odisha
*	************************************************************************

eststo: svy: reg m3_q85_light_main_satisfy stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "ODISHA"
eststo: svy: reg m3_q85_light_main_satisfy stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "ODISHA"
eststo: svy: reg m3_q85_light_main_satisfy stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "ODISHA"
eststo: svy: reg m3_q85_light_main_satisfy stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "ODISHA"
eststo: svy: reg m3_q85_light_main_satisfy m2_q68_elec districtd* if m1_q8_state == "ODISHA"
esttab using "RegSatisfactionLightSTDDimensionsOdisha.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m2_q77_electrified_satisfaction stdduration districtd* if m1_q8_state == "ODISHA"
eststo: svy: reg m2_q77_electrified_satisfaction stdreliability districtd* if m1_q8_state == "ODISHA"
eststo: svy: reg m2_q77_electrified_satisfaction stdquality districtd* if m1_q8_state == "ODISHA"
eststo: svy: reg m2_q77_electrified_satisfaction stdduration stdreliability stdquality districtd* if m1_q8_state == "ODISHA"
esttab using "RegSatisfactionElecSTDDimensionsOdisha.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households", pattern(1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m6_q137_support_rank_elec stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "ODISHA"
eststo: svy: reg m6_q137_support_rank_elec stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "ODISHA"
eststo: svy: reg m6_q137_support_rank_elec stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "ODISHA"
eststo: svy: reg m6_q137_support_rank_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "ODISHA"
eststo: svy: reg m6_q137_support_rank_elec m2_q68_elec districtd* if m1_q8_state == "ODISHA"
esttab using "RegElecRankSTDDimensionsOdisha.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m3_q94_1_rank_household_elec stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "ODISHA"
eststo: svy: reg m3_q94_1_rank_household_elec stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "ODISHA"
eststo: svy: reg m3_q94_1_rank_household_elec stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "ODISHA"
eststo: svy: reg m3_q94_1_rank_household_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "ODISHA"
eststo: svy: reg m3_q94_1_rank_household_elec m2_q68_elec districtd* if m1_q8_state == "ODISHA"
esttab using "RegElecAltRankSTDDimensionsOdisha.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear


*	************************************************************************
* 	Uttar Pradesh
*	************************************************************************

eststo: svy: reg m3_q85_light_main_satisfy stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "UTTAR PRADESH"
eststo: svy: reg m3_q85_light_main_satisfy stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "UTTAR PRADESH"
eststo: svy: reg m3_q85_light_main_satisfy stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "UTTAR PRADESH"
eststo: svy: reg m3_q85_light_main_satisfy stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "UTTAR PRADESH"
eststo: svy: reg m3_q85_light_main_satisfy m2_q68_elec districtd* if m1_q8_state == "UTTAR PRADESH"
esttab using "RegSatisfactionLightSTDDimensionsUP.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m2_q77_electrified_satisfaction stdduration districtd* if m1_q8_state == "UTTAR PRADESH"
eststo: svy: reg m2_q77_electrified_satisfaction stdreliability districtd* if m1_q8_state == "UTTAR PRADESH"
eststo: svy: reg m2_q77_electrified_satisfaction stdquality districtd* if m1_q8_state == "UTTAR PRADESH"
eststo: svy: reg m2_q77_electrified_satisfaction stdduration stdreliability stdquality districtd* if m1_q8_state == "UTTAR PRADESH"
esttab using "RegSatisfactionElecSTDDimensionsUP.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households", pattern(1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m6_q137_support_rank_elec stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "UTTAR PRADESH"
eststo: svy: reg m6_q137_support_rank_elec stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "UTTAR PRADESH"
eststo: svy: reg m6_q137_support_rank_elec stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "UTTAR PRADESH"
eststo: svy: reg m6_q137_support_rank_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "UTTAR PRADESH"
eststo: svy: reg m6_q137_support_rank_elec m2_q68_elec districtd* if m1_q8_state == "UTTAR PRADESH"
esttab using "RegElecRankSTDDimensionsUP.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m3_q94_1_rank_household_elec stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "UTTAR PRADESH"
eststo: svy: reg m3_q94_1_rank_household_elec stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "UTTAR PRADESH"
eststo: svy: reg m3_q94_1_rank_household_elec stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "UTTAR PRADESH"
eststo: svy: reg m3_q94_1_rank_household_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "UTTAR PRADESH"
eststo: svy: reg m3_q94_1_rank_household_elec m2_q68_elec districtd* if m1_q8_state == "UTTAR PRADESH"
esttab using "RegElecAltRankSTDDimensionsUP.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear



*	************************************************************************
* 	West Bengal
*	************************************************************************

eststo: svy: reg m3_q85_light_main_satisfy stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "WEST BENGAL"
eststo: svy: reg m3_q85_light_main_satisfy stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "WEST BENGAL"
eststo: svy: reg m3_q85_light_main_satisfy stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "WEST BENGAL"
eststo: svy: reg m3_q85_light_main_satisfy stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "WEST BENGAL"
eststo: svy: reg m3_q85_light_main_satisfy m2_q68_elec districtd* if m1_q8_state == "WEST BENGAL"
esttab using "RegSatisfactionLightSTDDimensionsWB.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m2_q77_electrified_satisfaction stdduration districtd* if m1_q8_state == "WEST BENGAL"
eststo: svy: reg m2_q77_electrified_satisfaction stdreliability districtd* if m1_q8_state == "WEST BENGAL"
eststo: svy: reg m2_q77_electrified_satisfaction stdquality districtd* if m1_q8_state == "WEST BENGAL"
eststo: svy: reg m2_q77_electrified_satisfaction stdduration stdreliability stdquality districtd* if m1_q8_state == "WEST BENGAL"
esttab using "RegSatisfactionElecSTDDimensionsWB.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households", pattern(1 0 0 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m6_q137_support_rank_elec stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "WEST BENGAL"
eststo: svy: reg m6_q137_support_rank_elec stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "WEST BENGAL"
eststo: svy: reg m6_q137_support_rank_elec stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "WEST BENGAL"
eststo: svy: reg m6_q137_support_rank_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "WEST BENGAL"
eststo: svy: reg m6_q137_support_rank_elec m2_q68_elec districtd* if m1_q8_state == "WEST BENGAL"
esttab using "RegElecRankSTDDimensionsWB.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear

eststo: svy: reg m3_q94_1_rank_household_elec stdduration districtd* if m2_q68_elec == 1 & m1_q8_state == "WEST BENGAL"
eststo: svy: reg m3_q94_1_rank_household_elec stdreliability districtd* if m2_q68_elec == 1 & m1_q8_state == "WEST BENGAL"
eststo: svy: reg m3_q94_1_rank_household_elec stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "WEST BENGAL"
eststo: svy: reg m3_q94_1_rank_household_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 & m1_q8_state == "WEST BENGAL"
eststo: svy: reg m3_q94_1_rank_household_elec m2_q68_elec districtd* if m1_q8_state == "WEST BENGAL"
esttab using "RegElecAltRankSTDDimensionsWB.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
eststo clear




*	************************************************************************
* 	Untransformed variables
*	************************************************************************

eststo: svy: reg m3_q85_light_main_satisfy duration districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy reliability districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy quality districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy duration reliability quality districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy m2_q68_elec districtd*
esttab using "RegSatisfactionLightDimensions.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear


eststo: svy: reg m2_q77_electrified_satisfaction duration districtd*
eststo: svy: reg m2_q77_electrified_satisfaction reliability districtd*
eststo: svy: reg m2_q77_electrified_satisfaction quality districtd*
eststo: svy: reg m2_q77_electrified_satisfaction duration reliability quality districtd*
esttab using "RegSatisfactionElecDimensions.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households", pattern(1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

eststo: svy: reg m6_q137_support_rank_elec duration districtd* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec reliability districtd* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec quality districtd* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec duration reliability quality districtd* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec m2_q68_elec districtd*
esttab using "RegElecRankDimensions.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

eststo: svy: reg m3_q94_1_rank_household_elec duration districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec reliability districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec quality districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec duration reliability quality districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec m2_q68_elec districtd*
esttab using "RegElecAltRankDimensions.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear




*	************************************************************************
* 	Interaction Effects
*	************************************************************************

eststo: svy: reg m3_q85_light_main_satisfy stdduration stdreliability stddur_x_reliability districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy stdduration stdreliability stddur_x_reliability stdquality districtd* if m2_q68_elec == 1

eststo: svy: reg m2_q77_electrified_satisfaction stdduration stdreliability stddur_x_reliability districtd*
eststo: svy: reg m2_q77_electrified_satisfaction stdduration stdreliability stddur_x_reliability stdquality districtd*

eststo: svy: reg m6_q137_support_rank_elec stdduration stdreliability stddur_x_reliability districtd* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec stdduration stdreliability stddur_x_reliability stdquality districtd* if m2_q68_elec == 1

eststo: svy: reg m3_q94_1_rank_household_elec stdduration stdreliability stddur_x_reliability districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec stdduration stdreliability stddur_x_reliability stdquality districtd* if m2_q68_elec == 1

esttab using "RegSTDDimensionsInteract.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Light Sat" "Elec Sat" "Priority" "Rank", pattern(1 0 1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear


*	************************************************************************
* 	Table Lighting Satisfaction
*	************************************************************************

eststo: svy: reg m2_q70_elec_night_hrs stdduration districtd* if m2_q68_elec == 1
eststo: svy: reg m2_q70_elec_night_hrs stdreliability districtd* if m2_q68_elec == 1
eststo: svy: reg m2_q70_elec_night_hrs stdquality districtd* if m2_q68_elec == 1
eststo: svy: reg m2_q70_elec_night_hrs stdduration stdreliability stdquality districtd* if m2_q68_elec == 1
eststo: svy: reg m2_q70_elec_night_hrs m2_q68_elec districtd*
esttab using "RegNightLightSTDDimensions.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear


*	************************************************************************
* 	Night duration
*	************************************************************************

eststo: svy: reg m3_q85_light_main_satisfy stddurationNight districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy stddurationNight stdreliability stdquality districtd* if m2_q68_elec == 1
eststo: svy: reg m2_q77_electrified_satisfaction stddurationNight districtd*
eststo: svy: reg m2_q77_electrified_satisfaction stddurationNight stdreliability stdquality districtd*
eststo: svy: reg m6_q137_support_rank_elec stddurationNight districtd* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec stddurationNight stdreliability stdquality districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec stddurationNight districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec stddurationNight stdreliability stdquality districtd* if m2_q68_elec == 1
esttab using "RegDurationNight.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Light Sat." "Elec. Sat." "Rank 1" "Rank 2", pattern(1 0 1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear


eststo: svy: reg m3_q98_elect_willpay m3_q85_light_main_satisfy
eststo: reg m3_q98_elect_willpay m3_q85_light_main_satisfy  
eststo: svy: reg m3_q98_elect_willpay m2_q77_electrified_satisfaction 
eststo: reg m3_q98_elect_willpay m2_q77_electrified_satisfaction  
esttab using "RegWTPSatisfaction.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	mgroups("Light Sat." "Elec. Sat.", pattern(1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	mtitles("Weighted OLS" "OLS" "Weighted OLS" "OLS")	
eststo clear


*	************************************************************************
* 	Checking results with census data (requires CensusData2011.dta)
*	************************************************************************

preserve

*	1. Merge 
merge m:1 m1_q11_village_code using "./CensusData2011.dta"
drop if _merge == 2

*	2. New data from the census
gen mean_hours = (summer_hours + winter_hours) / 2
egen stdmean_hours = std(mean_hours)

label var mean_hours "Duration (census)"
label var stdmean_hours "Duration (census)"

*	3. Checking the quality of duration variable
cor mean_hours duration

corr mean_hours m2_q69_elec_hrs 

eststo: reg stdduration stdmean_hours, cluster(m1_q11_village)
eststo: reg m3_q85_light_main_satisfy stdmean_hours, cluster(m1_q11_village)
eststo: reg m2_q77 stdmean_hours, cluster(m1_q11_village)
distinct m1_q11_village if e(sample)==1
distinct m1_q11_village if mean_hours != .
esttab using "NERegVillageCensus.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	
eststo clear

restore



*	************************************************************************
* 	State FE (original results)
*	************************************************************************

eststo: svy: reg m3_q85_light_main_satisfy stdduration stated* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy stdreliability stated* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy stdquality stated* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy stdduration stdreliability stdquality stated* if m2_q68_elec == 1
eststo: svy: reg m3_q85_light_main_satisfy m2_q68_elec stated*
esttab using "RegSatisfactionLightSTDDimensions.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(State FE = stated*, label($\checkmark$ ))	
eststo clear

eststo: svy: reg m2_q77_electrified_satisfaction stdduration stated*
eststo: svy: reg m2_q77_electrified_satisfaction stdreliability stated*
eststo: svy: reg m2_q77_electrified_satisfaction stdquality stated*
eststo: svy: reg m2_q77_electrified_satisfaction stdduration stdreliability stdquality stated*
esttab using "RegSatisfactionElecSTDDimensions.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households", pattern(1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(State FE = stated*, label($\checkmark$ ))	
eststo clear

eststo: svy: reg m6_q137_support_rank_elec stdduration stated* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec stdreliability stated* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec stdquality stated* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec stdduration stdreliability stdquality stated* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec m2_q68_elec stated*
esttab using "RegElecRankSTDDimensions.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(State FE = stated*, label($\checkmark$ ))	
eststo clear

eststo: svy: reg m3_q94_1_rank_household_elec stdduration stated* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec stdreliability stated* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec stdquality stated* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec stdduration stdreliability stdquality stated* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec m2_q68_elec stated*
esttab using "RegElecAltRankSTDDimensions.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(State FE = stated*, label($\checkmark$ ))	
eststo clear


*	************************************************************************
* 	Subsamples
*	************************************************************************


eststo: svy: reg m3_q85_light_main_satisfy stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 
eststo: svy: reg m3_q85_light_main_satisfy stdduration stdreliability districtd* if m2_q68_elec == 1 & stdquality < 0
eststo: svy: reg m3_q85_light_main_satisfy stdduration stdreliability districtd* if m2_q68_elec == 1 & stdquality >= 0
eststo: svy: reg m3_q85_light_main_satisfy stdduration stdquality districtd* if m2_q68_elec == 1 & stdreliability < 0
eststo: svy: reg m3_q85_light_main_satisfy stdduration stdquality districtd* if m2_q68_elec == 1 & stdreliability >= 0
eststo: svy: reg m3_q85_light_main_satisfy stdreliability stdquality districtd* if m2_q68_elec == 1 & stdduration < 0
eststo: svy: reg m3_q85_light_main_satisfy stdreliability stdquality districtd* if m2_q68_elec == 1 & stdduration >= 0

esttab using "RegSatisfactionLightSTDDimensionsSubsamplesDFE.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	mtitles(" " "$<$ Mean" "$\geq$ Mean" "$<$ Mean" "$\geq$ Mean" "$<$ Mean" "$\geq$ Mean")	///
	mgroups("All" "Volt. Stab." "Reliability" "Duration", pattern(1 1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear


eststo: svy: reg m2_q77_electrified_satisfaction stdduration stdreliability stdquality districtd* if m2_q68_elec == 1 
eststo: svy: reg m2_q77_electrified_satisfaction stdduration stdreliability districtd* if m2_q68_elec == 1 & stdquality < 0
eststo: svy: reg m2_q77_electrified_satisfaction stdduration stdreliability districtd* if m2_q68_elec == 1 & stdquality >= 0
eststo: svy: reg m2_q77_electrified_satisfaction stdduration stdquality districtd* if m2_q68_elec == 1 & stdreliability < 0
eststo: svy: reg m2_q77_electrified_satisfaction stdduration stdquality districtd* if m2_q68_elec == 1 & stdreliability >= 0
eststo: svy: reg m2_q77_electrified_satisfaction stdreliability stdquality districtd* if m2_q68_elec == 1 & stdduration < 0
eststo: svy: reg m2_q77_electrified_satisfaction stdreliability stdquality districtd* if m2_q68_elec == 1 & stdduration >= 0

esttab using "RegSatisfactionElecSTDDimensionsSubsamplesDFE.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	mtitles("" "$<$ Mean" "$\geq$ Mean" "$<$ Mean" "$\geq$ Mean" "$<$ Mean" "$\geq$ Mean")	///
	mgroups("All" "Volt. Stab." "Reliability" "Duration", pattern(1 1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear



*	************************************************************************
* 	Village-level analysis
*	************************************************************************

preserve

collapse (mean) m3_q85_light_main_satisfy m2_q77_electrified_satisfaction stdduration stdreliability stdquality m2_q68_elec (first) m1_q9_district, by(m1_q11_village_code)
quiet tab m1_q9_district, gen(districtd)

label variable stdduration "Duration (std)"
label variable stdreliability "Reliability (std)"
label variable stdquality "Voltage Stability (std)"
label variable m2_q68_elec "Electricity ($=$1)"

eststo: reg m3_q85_light_main_satisfy stdduration districtd* if m2_q68_elec == 1
eststo: reg m3_q85_light_main_satisfy stdreliability districtd* if m2_q68_elec == 1
eststo: reg m3_q85_light_main_satisfy stdquality districtd* if m2_q68_elec == 1 
eststo: reg m3_q85_light_main_satisfy stdduration districtd* stdreliability stdquality if m2_q68_elec == 1 
eststo: reg m3_q85_light_main_satisfy m2_q68_elec districtd*
esttab using "RegSatisfactionLightSTDDimensionsDFEVillage.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

eststo: reg m2_q77_electrified_satisfaction stdduration districtd*
eststo: reg m2_q77_electrified_satisfaction stdreliability districtd* 
eststo: reg m2_q77_electrified_satisfaction stdquality districtd* 
eststo: reg m2_q77_electrified_satisfaction stdduration districtd* stdreliability stdquality 
esttab using "RegSatisfactionElecSTDDimensionsDFEVillage.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	mgroups("Electrified Households", pattern(1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	nomtitles	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

restore



*	************************************************************************
* 	Policy with dummy outcome
*	************************************************************************

eststo: svy: reg rank_elec stdduration districtd* if m2_q68_elec == 1
eststo: svy: reg rank_elec stdreliability  districtd* if m2_q68_elec == 1
eststo: svy: reg rank_elec stdquality districtd* if m2_q68_elec == 1
eststo: svy: reg rank_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1
eststo: svy: reg rank_elec m2_q68_elec agricultured districtd*
esttab using "RegElecRankSTDDimensionsDummy.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

eststo: svy: reg rank_hh stdduration districtd* if m2_q68_elec == 1
eststo: svy: reg rank_hh stdreliability districtd* if m2_q68_elec == 1
eststo: svy: reg rank_hh stdquality districtd* if m2_q68_elec == 1
eststo: svy: reg rank_hh stdduration stdreliability stdquality districtd* if m2_q68_elec == 1
eststo: svy: reg rank_hh m2_q68_elec districtd*
esttab using "RegElecAltRankSTDDimensionsDummy.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

*	************************************************************************
* 	Policy with district Fe 
*	************************************************************************

eststo: svy: reg m6_q137_support_rank_elec stdduration districtd* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec stdreliability districtd* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec stdquality districtd* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1
eststo: svy: reg m6_q137_support_rank_elec m2_q68_elec districtd*
esttab using "RegElecRankSTDDimensionsDFE.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(District FE = districtd*, label($\checkmark$ ))	
eststo clear

eststo: svy: reg m3_q94_1_rank_household_elec stdduration districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec stdreliability districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec stdquality districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec stdduration stdreliability stdquality districtd* if m2_q68_elec == 1
eststo: svy: reg m3_q94_1_rank_household_elec m2_q68_elec districtd*
esttab using "RegElecAltRankSTDDimensionsDFE.tex"	///
	,  booktabs label replace ///
 	nodepvars se(2) b(2) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	substitute(m$ m\\$)	///
	compress nogaps r2(2) sfmt(%9.2f %9.0f) ///
	nomtitles	///
	mgroups("Electrified Households" "All", pattern(1 0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))	///
	indicate(State FE = districtd*, label($\checkmark$ ))	
eststo clear


*	************************************************************************
* 	Nonlinear Duration effects 
*	************************************************************************


xi: svy: reg m3_q85_light_main_satisfy i.duration districtd* if m2_q68_elec == 1, noc noomit
coefplot	///
		,	///
		vertical	///
		scheme(s2mono) graphregion(fcolor(white))	///
		ytitle("Marginal Effect (Baseline: 0 hours)")	///
		xtitle("Hours of Electricity per Day")	///
		coeflabel("_Iduration_1" = "1"	///
			"_Iduration_2" = " "	///
			"_Iduration_3" = " "	///
			"_Iduration_4" = " "	///
			"_Iduration_5" = " "	///
			"_Iduration_6" = "6"	///
			"_Iduration_7" = " "	///
			"_Iduration_8" = " "	///
			"_Iduration_9" = " "	///
			"_Iduration_10" = " "	///
			"_Iduration_11" = " "	///
			"_Iduration_12" = "12"	///
			"_Iduration_13" = " "	///
			"_Iduration_14" = " "	///
			"_Iduration_15" = " "	///
			"_Iduration_16" = " "	///
			"_Iduration_17" = " "	///
			"_Iduration_18" = "18"	///
			"_Iduration_19" = " "	///
			"_Iduration_20" = " "	///
			"_Iduration_21" = " "	///
			"_Iduration_22" = " "	///
			"_Iduration_23" = " "	///
			"_Iduration_24" = "24"	///
			)	///
		drop(district*)
graph export "NonlinearDurationLightSat.pdf", replace as(pdf)


xi: svy: reg m2_q77_electrified_satisfaction i.duration districtd*, noc noomit
coefplot	///
		,	///
		vertical	///
		scheme(s2mono) graphregion(fcolor(white))	///
		ytitle("Marginal Effect (Baseline: 0 hours)")	///
		xtitle("Hours of Electricity per Day")	///
		coeflabel("_Iduration_1" = "1"	///
			"_Iduration_2" = " "	///
			"_Iduration_3" = " "	///
			"_Iduration_4" = " "	///
			"_Iduration_5" = " "	///
			"_Iduration_6" = "6"	///
			"_Iduration_7" = " "	///
			"_Iduration_8" = " "	///
			"_Iduration_9" = " "	///
			"_Iduration_10" = " "	///
			"_Iduration_11" = " "	///
			"_Iduration_12" = "12"	///
			"_Iduration_13" = " "	///
			"_Iduration_14" = " "	///
			"_Iduration_15" = " "	///
			"_Iduration_16" = " "	///
			"_Iduration_17" = " "	///
			"_Iduration_18" = "18"	///
			"_Iduration_19" = " "	///
			"_Iduration_20" = " "	///
			"_Iduration_21" = " "	///
			"_Iduration_22" = " "	///
			"_Iduration_23" = " "	///
			"_Iduration_24" = "24"	///
			)	///
		drop(district*)
graph export "NonlinearDurationElecSat.pdf", replace as(pdf)

xi: svy: reg m6_q137_support_rank_elec i.duration districtd* if m2_q68_elec == 1, noc noomit
coefplot	///
		,	///
		vertical	///
		scheme(s2mono) graphregion(fcolor(white))	///
		ytitle("Marginal Effect (Baseline: 0 hours)")	///
		ylabel(0(0.4)2.3)	///
		xtitle("Hours of Electricity per Day")	///
		coeflabel("_Iduration_1" = "1"	///
			"_Iduration_2" = " "	///
			"_Iduration_3" = " "	///
			"_Iduration_4" = " "	///
			"_Iduration_5" = " "	///
			"_Iduration_6" = "6"	///
			"_Iduration_7" = " "	///
			"_Iduration_8" = " "	///
			"_Iduration_9" = " "	///
			"_Iduration_10" = " "	///
			"_Iduration_11" = " "	///
			"_Iduration_12" = "12"	///
			"_Iduration_13" = " "	///
			"_Iduration_14" = " "	///
			"_Iduration_15" = " "	///
			"_Iduration_16" = " "	///
			"_Iduration_17" = " "	///
			"_Iduration_18" = "18"	///
			"_Iduration_19" = " "	///
			"_Iduration_20" = " "	///
			"_Iduration_21" = " "	///
			"_Iduration_22" = " "	///
			"_Iduration_23" = " "	///
			"_Iduration_24" = "24"	///
			)	///
		drop(district*)
graph export "NonlinearDurationPolRank.pdf", replace as(pdf)

xi: svy: reg m3_q94_1_rank_household_elec i.duration districtd* if m2_q68_elec == 1, noc noomit
coefplot	///
		,	///
		vertical	///
		scheme(s2mono) graphregion(fcolor(white))	///
		ytitle("Marginal Effect (Baseline: 0 hours)")	///
		xtitle("Hours of Electricity per Day")	///
		coeflabel("_Iduration_1" = "1"	///
			"_Iduration_2" = " "	///
			"_Iduration_3" = " "	///
			"_Iduration_4" = " "	///
			"_Iduration_5" = " "	///
			"_Iduration_6" = "6"	///
			"_Iduration_7" = " "	///
			"_Iduration_8" = " "	///
			"_Iduration_9" = " "	///
			"_Iduration_10" = " "	///
			"_Iduration_11" = " "	///
			"_Iduration_12" = "12"	///
			"_Iduration_13" = " "	///
			"_Iduration_14" = " "	///
			"_Iduration_15" = " "	///
			"_Iduration_16" = " "	///
			"_Iduration_17" = " "	///
			"_Iduration_18" = "18"	///
			"_Iduration_19" = " "	///
			"_Iduration_20" = " "	///
			"_Iduration_21" = " "	///
			"_Iduration_22" = " "	///
			"_Iduration_23" = " "	///
			"_Iduration_24" = "24"	///
			)	///
		drop(district*)
graph export "NonlinearDurationElecRank.pdf", replace as(pdf)

